<?php
// +-------------------------------------------------------------------
// |
// +-------------------------------------------------------------------
// | Copyright (c) 2009-2016 All rights reserved.
// +-------------------------------------------------------------------
namespace Service\Api\V1;

class BannerList
{
    public $login = false; //是否需要登录才能访问该接口
    public $title = "轮播图列表ok";
    public $group = '首页';
    public $desc = "";

    public $input = [
    ];

    public $output = [
        'list' => [
            [
                'id' => 'label=id;',
                'logo' => 'label=logo;',
                'image_url' => 'label=图片路径;',
                'url' => 'label=跳转链接;',
                'detail_img' => 'label=详情图;',
            ]
        ]
    ];

    public function run($param, $uid)
    {

        $list = M('adv')->order('sort desc')->select();
        return [
            'list' => $list,
        ];
    }
}
